package simsimdev;

import simsimdev.SimSimGateway;
import simsimdev.SimSimNetwork;
import simsimframework.Chart;
import simsimframework.Function;
import simsimframework.Gateway;
import simsimframework.Network;

public class SimSimFactory {

	public static SimSimGateway create(Gateway gateway){
		SimSimGateway ssgateway = new SimSimGateway();
		ssgateway.setName(gateway.getName());
		return ssgateway;
	}
	
	public static SimSimNetwork create(Network network){
		SimSimNetwork ssnetwork = new SimSimNetwork();
		ssnetwork.setName(network.getName());
		ssnetwork.setNodesNumber(network.getNodesNumber());
		ssnetwork.setMaxSeed(network.getMaxSeed());
		return ssnetwork;
	}
	
	public static SimSimChart create(Chart chart, int type){
		SimSimChart sschart = new SimSimChart(type,chart.getFramesPerSecond());
		sschart.setName(chart.getName());
		sschart.setFramesPerSecond(chart.getFramesPerSecond());
		sschart.setSave(chart.getSave());
		return sschart;
	}
	
	public static SimSimFunction create(Function function, int func){
		SimSimFunction ssfunction = new SimSimFunction(func);
		ssfunction.setName(function.getName());
		return ssfunction;
	}
	
}
